<template>
  <div class="page-container">
    <div>
      <h1 @click="backHome">404, 页面不存在</h1>
      <router-link :to="{ path: '/' }">回到首页</router-link>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { useRouter } from "vue-router";
export default defineComponent({
  name: "NotFound",
  setup() {
    const router = useRouter();
    const backHome = () => {
      router.push("/");
    };

    const goBack = () => {
      router.back();
    };

    return {
      backHome,
      goBack
    };
  }
});
</script>

<style lang="scss" scoped>
.page-container {
  display: flex;
  width: 100vw;
  // height: 100vh;
  background-color: white;
  justify-content: center;
  align-items: center;
}
</style>
